home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1138 / source.zip / ERROR.H < prev    next >
C/C++ Source or Header  |  1995-02-05  |  1KB  |  36 lines

  1. /*      error.h -- handles assertions (faults) in code
  2.     This file is part of Paperboy, an offline mail/newsreader for Windows
  3.     Copyright (C) 1995  Michael H. Vartanian
  4.         vart@clark.net
  5.  
  6.     This program is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2 of the License, or
  9.     (at your option) any later version.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with this program; if not, write to the Free Software
  18.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #ifndef HERROR
  21. #define HERROR
  22.  
  23. #ifdef NDEBUG
  24. #undef assert
  25. #define assert(EX) ((void)0)
  26. #else
  27. extern void logassert(const char *, const char *,const int);
  28. #define assert(EX) (void)((EX) || (logassert(#EX, __FILE__, __LINE__), 0))
  29. #endif  /* DEBUG */
  30.  
  31. #define LOGFILE "\\PBFAULT.LOG"
  32.  
  33. extern char * errortext;
  34.  
  35. #endif
  36.